package com.hualan.controller;

import com.hualan.service.UserCourseService;
import com.hualan.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/userCourse")
public class UserCourseConTroller {

    @Autowired
    private UserCourseService userCourseService;

    //根据状态查询用户的课程
    @PostMapping("/selectByStatus")
    public R selectByStatus(int id){
        return userCourseService.selectByStatus(id);
    }

    @PostMapping("/selectAll")
    public R selectAll(int userId,int status){
        return userCourseService.selectAll(userId,status);
    }
}
